package org.feng.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import lombok.Data;
import org.feng.enums.CustomDictStatusEnum;
import org.feng.util.CustomDictEnumConvert;
import org.feng.util.LocalDateTimeConvert;

import java.time.LocalDateTime;

/**
 * 自定义字典表格vo
 *
 * @author feng
 */
@Data
public class CustomDictExcelVo {
    @ExcelProperty("字典ID")
    private Long id;
    @ExcelProperty("字典父级ID")
    private Long parentId;
    @ExcelProperty("描述")
    private String name;
    @ExcelProperty("字典key")
    private String dictKey;
    @ExcelProperty("字典val")
    private String dictVal;
    @ExcelProperty("权重")
    private Integer weight;
    @ExcelProperty(value = "是否启用", converter = CustomDictEnumConvert.class)
    private CustomDictStatusEnum status;
    @ExcelProperty("创建人")
    private String createUser;
    @ExcelProperty("创建人姓名")
    private String createUsername;
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "创建时间", converter = LocalDateTimeConvert.class)
    private LocalDateTime createTime;
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "更新时间", converter = LocalDateTimeConvert.class)
    private LocalDateTime updateTime;
}
